Type.registerNamespace('ModWatch');

ModWatch.CustomModWatcher = function() { 
    ModWatch.CustomModWatcher.initializeBase(this);

	this._savedValue = null;
	this._checkChange = null;
}

ModWatch.CustomModWatcher.prototype = {

	get_savedValue : function()
	{
		return this._savedValue;
	},

	set_savedValue : function(value)
	{
		this._savedValue = value;
	},

	get_checkChange : function()
	{
		return this._checkChange;
	},

	set_checkChange : function(value)
	{
		this._checkChange = value;
	},

	hasChanged : function()
	{
		if (!this._checkChange && typeof this._checkChange != 'function')
			return false;

		var args = new ModWatch.CustomModWatcherCheckChangeEventArgs(this.get_savedValue());
		this._checkChange(this, args);

		return args.get_hasChanged();
	}

}

ModWatch.CustomModWatcher.registerClass('ModWatch.CustomModWatcher', ModWatch.ModWatcherComponentBase);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
